<?php

include('../../appg/settings.php');
include('../../appg/init_ajax.php');
include("../../conf/settings.php");
if(!isset($_GET['DiscussionID'])) exit();

		$s = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder');
		$s->SetMainTable('Discussion', 'd');
		$s->AddSelect('Name','d');
		$s->AddWhere('d', 'DiscussionID', '', $_GET['DiscussionID'], '=');
		$Result = $Context->Database->Select($s, "name", 'setTitle', 'An error occurred while updating discussion properties.');
		// ok now I get the whole thing....
		while ($Row = $Context->Database->GetRow($Result)) {
			$MName = $Row['Name'];
			break; // I only need the first record
			}
		   header('Content-Type: text/html; charset=utf-8');
		   echo($MName);

?>